package org.eiahe.hr.salary.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 薪资历史对象 hr_salary_history
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hr_salary_history")
public class SalaryHistory extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 薪资历史ID
     */
    @TableId(type = IdType.AUTO)
    private Long historyId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    private String employeeNo;

    /**
     * 员工姓名
     */
    private String employeeName;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 部门
     */
    private String department;

    /**
     * 年月(yyyyMM格式)
     */
    @TableField("year_month1")
    private String yearMonth;

    /**
     * 职级工资
     */
    private BigDecimal jobLevelSalary;

    /**
     * 基本工资
     */
    private BigDecimal baseSalary;

    /**
     * 岗位工资
     */
    private BigDecimal positionSalary;

    /**
     * 绩效工资
     */
    private BigDecimal performanceSalary;

    /**
     * 职务津贴
     */
    private BigDecimal dutyAllowance;

    /**
     * 应出勤天数
     */
    private Integer shouldAttendanceDays;

    /**
     * 缺勤天数
     */
    private Integer absenceDays;

    /**
     * 计薪出勤天数
     */
    private Integer paidAttendanceDays;

    /**
     * 缺勤扣款
     */
    private BigDecimal absenceDeduction;

    /**
     * 误餐补助
     */
    private BigDecimal mealAllowance;

    /**
     * 其他调整
     */
    private BigDecimal otherAdjustment;

    /**
     * 餐费扣款
     */
    private BigDecimal mealDeduction;

    /**
     * 应发合并
     */
    private BigDecimal grossSalary;

    /**
     * 养老扣款
     */
    private BigDecimal pensionDeduction;

    /**
     * 失业扣款
     */
    private BigDecimal unemploymentDeduction;

    /**
     * 医疗扣款
     */
    private BigDecimal medicalDeduction;

    /**
     * 大额医疗扣款
     */
    private BigDecimal majorMedicalDeduction;

    /**
     * 社保个人扣款
     */
    private BigDecimal socialInsurancePersonal;

    /**
     * 公积金扣款
     */
    private BigDecimal housingFundPersonal;

    /**
     * 社保公积金合计
     */
    private BigDecimal socialHousingTotal;

    /**
     * 税前工资
     */
    private BigDecimal taxableSalary;

    /**
     * 个人所得税
     */
    private BigDecimal personalTax;

    /**
     * 实发工资
     */
    private BigDecimal netSalary;

    /**
     * 个人社保合计
     */
    private BigDecimal socialPersonalTotal;

    /**
     * 社保公司合计
     */
    private BigDecimal socialCompanyTotal;

    /**
     * 公积金个人金额
     */
    private BigDecimal housingFundPersonalAmount;

    /**
     * 公积金公司金额
     */
    private BigDecimal housingFundCompanyAmount;

    /**
     * 操作类型(1新增 2修改 3删除)
     */
    private String operationType;

    /**
     * 操作人
     */
    private String operator;

    /**
     * 操作时间
     */
    private Date operateTime;

    /**
     * 记录类型(薪资/调薪)
     */
    private String recordType;

    /**
     * 删除标志(0存在 1删除)
     */
    @TableLogic
    private String delFlag;
}
